package com.example.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.mapper.UserCommonMapper;
import com.example.demo.mapper.entity.SysUser;
import com.example.demo.mapper.entity.User;
import com.example.demo.service.UserCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserCommonServiceImpl extends ServiceImpl<UserCommonMapper, SysUser> implements UserCommonService{

    @Autowired
    private UserCommonMapper mapper;

    @Override
    public SysUser selectUserById(int userId) {
        return mapper.selectUserById(userId);
    }

    @Override
    public void placeAvater(SysUser currentUser) {
        mapper.placeAvatar(currentUser);
    }

    @Override
    public void updateSysUser(SysUser currentUser) {
        mapper.updateById(currentUser);
    }
}
